import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Router from 'vue-router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from "axios";
import VueAxios from "vue-axios";
import '@/assets/iconfont.css'
 

import VueQuillEditor from 'vue-quill-editor'

// 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor, /* { 默认全局 } */)

// 全局引入
import EleUploadImage from 'vue-ele-upload-image'


Vue.component(EleUploadImage.name, EleUploadImage)
axios.defaults.baseURL="http://localhost:8080";
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Vue.use(ElementUI)
Vue.use(VueAxios, axios)
Vue.use(VueQuillEditor, /* { 默认全局 } */)
Vue.config.productionTip = false

// 保存原始的 push 和 replace 方法
const originalPush = Router.prototype.push;
const originalReplace = Router.prototype.replace;

// 利用对象定义新的 push 和 replace 方法
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err);
};

Router.prototype.replace = function replace(location) {
  return originalReplace.call(this, location).catch(err => err);
};





new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
